<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
//    调取当前后台设置的默认模块的数据
    $model=\Modules\Admin\Service\ModuleService::getDefault();
//    dd($model);
    $class='\Modules\\'.$model['name'].'\Http\Controllers\HomeController';
    return app()->build($class)->index();
//    return view('welcome');
});

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');
//配置shop中的文章上传图片
Route::any('/upload','UploadController@upload');
//创建shop中的文章上传处理
Route::any('/upload-simditor','UploadController@UploadEdit');

//0718